package type.pets;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @Date 2021/4/29 6:25 下午
 * @Author dengxin
 */
public class LiteralCreator extends PetsCreator {

    static private final List<Class<? extends Pet>> types =
            Collections.unmodifiableList(Arrays.asList(Cat.class, Dog.class, Mouse.class, Snake.class));

//    static void load() {
//        types.add(Cat.class);
//        types.add(Dog.class);
//        types.add(Mouse.class);
//        types.add(Snake.class);
//    }
//
//    static {
//        load();
//    }

    @Override
    List<Class<? extends Pet>> types() {
        return types;
    }
}
